#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
#include <string.h>
int main()
{
	char a[100], b[100];
	gets(a);
	gets(b);
	int n, i = 0, j = 0, k = 0;
	scanf("%d", &n);
	char c[200];
	int la = strlen(a), lb = strlen(b);
	for (i = 0; i < la + lb; i++)
	{
		if (i < n)
		{
			c[i] = a[i];
			k = i + 1;
		}
		else if (i >= n && i < n + lb)
		{
			c[i] = b[j];
			j++;
		}
		else
		{
			c[i] = a[k];
			k++;
		}
	}
	c[i] = '\0';
	printf("%s", c);

	return 0;
}